using System;
using System.Web;

public class UserMapPath : IHttpModule {
  public String ModuleName {
    get {
      return "UserMapPath";
    }
  }

  public void Init(HttpApplication app) {
    app.BeginRequest += new EventHandler(this.App_BeginRequest);
  }

  public void App_BeginRequest(Object sender, EventArgs e) {
    HttpApplication application = (HttpApplication) sender;
    HttpContext context = application.Context;
    HttpRequest Request = context.Request;

    String path = Request.Path;
    int index = path.IndexOf("~");
    
    if (index > 0) {
      String newPath = path.Substring(0, (index - 1));
      String name = path.Substring(index);
context.Response.Write(newPath + " : " + name);
      
    }
  }

  public void Dispose() {
  }
}